-
Notifications
You must be signed in to change notification settings - Fork 0
[Feature/#19] API 연결을 위한 기본 세팅 #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The head ref may contain hidden characters: "feature/#19-api-\uC5F0\uACB0\uC744-\uC704\uD55C-\uAE30\uBCF8-\uC138\uD305"
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
이 PR은 API 연결을 위한 기본 인프라를 구축하는 작업입니다. Axios 인스턴스 설정, React Query 커스텀 훅, 비동기 처리를 위한 에러/로딩 UI 컴포넌트, 그리고 404 에러 페이지를 추가했습니다.
Changes:
- Axios 인스턴스와 인터셉터 뼈대 구축
- React Query 래퍼 훅 구현 (useCustomQuery, useCustomSuspenseQuery, useCustomInfiniteQuery, useCustomMutation)
- 비동기 에러/로딩 처리를 위한 AsyncBoundary 및 SuspenseFallback 컴포넌트 추가
- 404 및 에러 페이지 구현 및 라우터 설정
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/shared/api/axios.ts | Axios 인스턴스 생성 및 기본 설정 (baseURL, headers, credentials), 응답 인터셉터 뼈대 추가 |
| src/shared/hooks/customQuery.ts | React Query 훅들의 기본값(staleTime, retry, refetchOnWindowFocus) 통일을 위한 커스텀 래퍼 훅 구현 |
| src/shared/ui/common/SuspenseFallback/SuspenseFallback.tsx | Suspense의 fallback으로 사용될 로딩 UI 컴포넌트 |
| src/shared/ui/common/AsyncBoundary/AsyncBoundary.tsx | ErrorBoundary와 Suspense를 결합한 비동기 처리 래퍼 컴포넌트 |
| src/shared/ui/common/AsyncBoundary/AsyncBoundaryFallback.tsx | 에러 발생 시 표시될 fallback UI 컴포넌트 |
| src/shared/ui/common/AsyncBoundary/AsyncBoundaryFallback.styles.ts | AsyncBoundaryFallback의 스타일 정의 |
| src/pages/common/ErrorPage/ErrorPage.tsx | 404 및 라우팅 에러를 처리하는 페이지 컴포넌트 |
| src/pages/common/ErrorPage/ErrorPage.styles.ts | ErrorPage의 스타일 정의 |
| src/routes/Router.tsx | 404 에러 페이지를 위한 와일드카드 라우트 추가 |
🔗 관련 이슈
🧩 작업 요약 (TL;DR)
🔄 변경 유형
해당되는 항목에 체크해주세요.
📌 주요 변경 사항
🖼️ 스크린샷 / 영상 (선택)
🧠 리뷰 요청 포인트
🚧 미완 / 후속 작업
💬 기타 참고 사항
.github/instructions/capstone.instructions.md 파일을 지침으로 삼으세요.
폴더/파일 위치가 프로젝트 구조 규칙과 일치하는지
컴포넌트가 단일 책임 원칙(SRP)을 지키는지
import 방향이 올바른지 (shared → features 역방향 없음)
명명/케이스가 일관적인지 (PascalCase vs camelCase)
배럴(index.ts) 사용이 현 패턴을 따르는지
응답은 한국어로, 발견된 위반 항목과 추천 구조를 포함해주세요.
리뷰를 달아주세요